#include "CloseTask.h"
#include "SocketIO.h"
namespace task {
    int CloseTask::clientAction(socketinf serverinf, const char * arg, size_t len) {
        // Auto generate
        SocketIO sio(serverinf);

        // IMPORTANT trigger master execute serverAction 
        sio.socketWriter->sendFrame(TaskFlag::closetask, 0);
        sio.close();

        return AUTO_CLOSE;
    }
    int CloseTask::serverAction(socketinf clientinf, unsigned long long dataLength) {
        // Auto generate
        SocketIO sio(clientinf);

        return AUTO_CLOSE;
    }
}
